package com.hdax.dm.controller;

import com.hdax.dm.dto.CommonResponse;
import com.hdax.dm.dto.DtoUtil;
import com.hdax.dm.service.SchedulerSeatPriceService;
import com.hdax.dm.vo.SeatPriceVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class SchedulerSeatPriceController {

    @Autowired
    private SchedulerSeatPriceService schedulerSeatPriceService;

    @PostMapping(path = "/getPrice")
    public CommonResponse<List<SeatPriceVo>> getPrice(@RequestBody Map<String,Long> params){
        Long scheduleId = params.get("scheduleId");
        return DtoUtil.returnSuccess("",schedulerSeatPriceService.getPrice(scheduleId));
    }

}
